using System.Web.Security;

namespace SpiderMaster.AspNet.TradingSystem
{
    public sealed partial class TradingCenterMember
    {
        /// <summary> Approves the specified member.
        /// </summary>
        /// <param name="Member">The member.</param>
        /// <param name="LogIn">if set to <c>true</c> [log in].</param>
        public static void Approve(MembershipUser Member, bool LogIn)
        {
            Member.IsApproved = true;
            Membership.UpdateUser(Member);

            if (LogIn)
                FormsAuthentication.RedirectFromLoginPage(Member.UserName, false);
        }
    }
}